<?php echo script::add('jquery'); ?>
<script type="text/javascript">$(document).ready(function(){
$('#submit_button').click(function(){var link_name=$('#link_name_box').val(); var link_url=$('#link_url_box').val(); var link_note=$('#link_description_box').val();if(link_name==''){alert('链接名称不能为空!');$('#link_name_box').focus();return false;}if(link_url==''){alert('链接网址不能为空');$('#link_url_box').focus();return false;}$.post('<?php echo $this->get_action_url('ajax_insert_link'); ?>', {link_name:link_name,link_url:link_url,link_note:link_note}, function(data){if(data==101){alert('恭喜!添加成功');location.href='<?php echo $this->get_action_url('index'); ?>'}else{alert(data);}});});
});</script>
<table width="800" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="30" align="left">>><?php echo $site_name; ?></td>
      </tr>
      <tr>
        <td align="left" valign="top"><table width="100%" border="0" cellspacing="5" cellpadding="0">
		<tr>
            <td height="40" align="right">&nbsp;</td>
            <td align="left">&nbsp;</td>
          </tr>
          <tr>
            <td width="120" height="40" align="right">链接名：</td>
            <td align="left"><input type="text" name="link_name" id="link_name_box" /></td>
          </tr>
          <tr>
            <td height="40" align="right">链接网址：</td>
            <td align="left"><input type="text" name="link_url" id="link_url_box" />&nbsp;(格式：http://链接网址)</td>
          </tr>
          <tr>
            <td height="60" align="right">链接描述：</td>
            <td align="left"><textarea name="link_description" id="link_description_box"></textarea></td>
          </tr>
          <tr>
            <td height="40" align="right">&nbsp;</td>
            <td align="left"><input type="button" name="submit_button" id="submit_button" value="提交"/></td>
          </tr>
          
        </table></td>
      </tr>
</table>